from flask_wtf import FlaskForm
from wtforms import StringField
from wtforms.validators import DataRequired, length


class CompletionReq(FlaskForm):
    query = StringField('query', validators=[
        DataRequired(message="请输入问题"),
        length(min=1, max=2000, message="提问的长度超出限制最大为2000"),
    ])
